﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TargetCostAdjustMbjzSP_ExtendForm.aspx.vb" Inherits="PubProject.TargetCostAdjustMbjzSP_ExtendForm" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o="urn:schemas-microsoft-com:office:office">
	<HEAD>
		<title></title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/MyWorkflow/Workflow.js"></script>
		<script language="javascript" src="/MyWorkflow/Blank.js"></script>
		<script language="javascript" src="/PubProject/js/Public.js"></script>		
		<script language="javascript" src="/CBGL/JS/BudgetCostUse.js"></script>
		<script language="javascript" src="/CBGL/HTZX/HtBudget_Setup.js"></script>
		<script language="javascript" src="/CBGL/JS/StockCostUse.js"></script>
		<script language="javascript" src="/CBGL/JS/Public.js"></script>
		<style> body{font-size:9pt;}
	table{font-size:9pt;}
	P{font-size:9pt;}
		</style>
		<LINK href="/MyWorkflow/css/form.css" type="text/css" rel="stylesheet">
		<script language="javascript">
		    var ObjBudgetCostUse = null;//选择合约规划类
//			var ObjStockCostUse = null; //选择公司库存类
//			var IfDdhs=null;            //是否单独执行
			 var sCfTypeName,sCfSouce,sRefType,sRefGUID,sContractGUID;
			/*------------------------------------------------------------------*/
			//表单接口函数，需扩展
			//1、Fill	--	表单填充
			//2、GetXML --	表单取数
			//3、Valid	--	表单校验
			/*------------------------------------------------------------------*/
			//屏避右键
			function document.oncontextmenu()
			{
				var s = event.srcElement.tagName;
				// For Selection Ranges, s will be UNDEFINED
				if (s && s != "INPUT" && s != "TEXTAREA" || event.srcElement.disabled || document.selection.createRange().text.length == 0)
				{
					event.returnValue = false;
				}
			}
			//功能：表单填充
			//editableDomainList	当前步骤可编辑域
			//invisibleDomainList   当前步骤不可见域
			//domainXML				域XML
			function Fill(editableDomainList,invisibleDomainList,domainXML)
			{
				var xmlDom = new ActiveXObject("Microsoft.XMLDOM"); 
//			 	Form1.TxtUseCostInfo.setReadOnly(true, false);
//	            Form1.TxtUseCostInfo.style.cursor = "hand"
//	            Form1.TxtUseCostInfo.style.textDecorationUnderline = "true"

				if (domainXML && domainXML.length>0)	
				{		
					xmlDom.async=false; 
					xmlDom.loadXML(domainXML);
					
					if(xmlDom.parseError.errorCode != 0) 
						xmlDom = null; 
				}
				else
				{
					xmlDom = null;
				}
 
				Form1.TxtProjectName.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='项目名称']").text;
				Form1.txtSubject.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='主题']").text;				
				Form1.txtExportCost.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='转出科目']").text;				
				Form1.txtImportCost.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='转入科目']").text;
				Form1.txtAdjustAmount.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='调整金额']").text;
				Form1.txtRemarks.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='调整原因']").text;
				Form1.txtJbr.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='经办人']").text;
				Form1.txtJbTime.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='经办时间']").text;
				Form1.txtSpbmYj.value = xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='审批部门意见']").text;
				
				var objlist = getHTMLDomainField(document);
				for(var i=0;i<objlist.length;i++)
				{ 	
					if((invisibleDomainList+",").indexOf(objlist[i].dm_name + ',')>-1)
					{
						//不可见域不显示
						objlist[i].style.display="none";
					}
				
					//不可编辑的disabled,可编辑的enabled
					if((editableDomainList+",").indexOf(objlist[i].dm_name + ',')>-1)
					{
						objlist[i].readOnly =false;
					}
					else
					{
						objlist[i].readOnly =true;
					}
				}
			}
			
			//功能：表单取数
			//参数：取值前的domainxml
			//返回值 取值后的domainxml
			function GetXML(domainXML)
			{
				var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
				 
				xmlDom.async=false;
				xmlDom.loadXML(domainXML);
						
				if(xmlDom.parseError.errorCode != 0) return "";
				 
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='项目名称']").text = Form1.TxtProjectName.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='主题']").text = Form1.txtSubject.value;				
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='转出科目']").text = Form1.txtExportCost.value;				
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='转入科目']").text = Form1.txtImportCost.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='调整金额']").text = Form1.txtAdjustAmount.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='调整原因']").text = Form1.txtRemarks.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='经办人']").text = Form1.txtJbr.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='经办时间']").text = Form1.txtJbTime.value;
				xmlDom.selectSingleNode("/BusinessType/Item/Domain[@name='审批部门意见']").text = Form1.txtSpbmYj.value ;
			
				return xmlDom.xml;	
			}
			
			//功能：表单校验
			//参数：可编辑域列表
			function Valid(editableDomainList)
			{
				return true;
			}
			

</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout" id="bodyId">
		<form id="Form1" method="post" runat="server">
			<asp:textbox id="ApplyUserGUID" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ApplyDeptGUID" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="ResultTypeGUID" runat="server" style="display:none"></asp:textbox>
			<asp:textbox id="WorkResultGUID" runat="server" style="display:none"></asp:textbox>	
			<asp:textbox id="txtAlterBudgetList" style="DISPLAY: none" Runat="server"></asp:textbox>

			<TABLE width="100%">
				<TBODY>
					<TR>
						<TD><!-- 表单 -->
							<P align="center" id="pTitle"><FONT style="FONT-SIZE: 16px"><STRONG>目标成本结转审批表</STRONG></FONT></P>
							<P align="center">
								<TABLE style="TABLE-LAYOUT: fixed; WIDTH: 90%; BORDER-COLLAPSE: collapse" borderColor="#517dbf"
									cellSpacing="2" cellPadding="3" align="center" bgColor="#ffffff" border="1">
									<colgroup>
										<col width="100">
										<col>
										<col width="100">
										<col>										
									</colgroup>
									<TR height="25">
										<TD>
											项目名称
										</TD>
										<TD colspan="3">
											<INPUT class="txt" id="TxtProjectName" style="WIDTH: 100%; HEIGHT: 100%" maxLength="4000" dm_name="项目名称">
										</TD>							
									</TR>
							        <tr height="25">
							            <td>主题</td>
							            <td colspan=3>
							                <INPUT class="txt" id="txtSubject" style="WIDTH: 100%; HEIGHT: 100%" maxLength="300" dm_name="主题">
							            </td>
							        </tr>
							        <tr height="25">
							            <td>转出科目</td>
							            <td>
							                <INPUT class="txt" id="txtExportCost" style="WIDTH: 100%; HEIGHT: 100%" maxLength="100" dm_name="转出科目">
							            </td>
							            <td>转入科目</td>
							            <td>
							                <INPUT class="txt" id="txtImportCost" style="WIDTH: 100%; HEIGHT: 100%" maxLength="100" dm_name="转入科目">
							            </td>
							        </tr>
							        <tr height="25">
							            <td>调整金额</td>
							            <td colspan=3>
							                <INPUT class="num" id="txtAdjustAmount" style="WIDTH: 100%; HEIGHT: 100%" maxLength="100" dm_name="调整金额" grp="true" acc="2">
							            </td>
							        </tr>
									<TR height="150">
										<TD align=center>
											调整原因
										</TD>
										<TD colspan=3>
                                            <textarea  style="WIDTH: 100%; HEIGHT:100%" id="txtRemarks" cols="110" rows="15"  dm_name="调整原因"></textarea>
										</TD>										
									</TR>
						            <tr height="25">
							            <td>经办人</td>
							            <td>
							                <INPUT class="txt" id="txtJbr" style="WIDTH: 100%; HEIGHT: 100%" maxLength="100" dm_name="经办人">
							                
							            </td>
							            <td>经办时间</td>
							            <td>
							                <INPUT class="txt" id="txtJbTime" style="WIDTH: 100%; HEIGHT: 100%" maxLength="100" dm_name="经办时间">
							            </td>
							        </tr>
									<TR height="200">
										<TD align=center>
											审批部门意见
										</TD>
										<TD colspan=3>
                                            <textarea  style="WIDTH: 100%; HEIGHT:100%" id="txtSpbmYj" cols="140" rows="15"  dm_name="审批部门意见"></textarea>
										</TD>										
									</TR>
								</TABLE>
							</P>
						</TD>
					</TR>					
				</TBODY>
			</TABLE>
		</form>
	</body>
</HTML>